﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Forums/Forums.Master" AutoEventWireup="true"
    CodeBehind="QuestionForm.aspx.cs" Inherits="ExpertMIS.Forums.QuestionForm" EnableEventValidation="false" %>

<%@ Register Src="UserControl/ucUserCard.ascx" TagName="ucUserCard" TagPrefix="uc1" %>
<%@ Register Src="../UserControl/ucHotHead.ascx" TagName="ucHotHead" TagPrefix="uc3" %>
<%@ Register Src="../UserControl/ucLastedQuestionList.ascx" TagName="ucLastedQuestionList"
    TagPrefix="uc4" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <style type="text/css">
        .qcontext
        {
            width: 740px;
            height: auto;
            float: left;
        }
        .qlinks
        {
            width: 200px;
            height: auto;
            float: right;
        }
        .qtitle
        {
            border: #9db4c6 1px solid;
            padding: 1px;
            height: auto;
        }
        .qheader
        {
            height: auto;
            min-height: 31px;
            line-height: 31px;
            vertical-align: bottom;
            background-image: url(                '../imgs/forums/questiontitle.gif' );
            background-repeat: repeat-x;
            background-attachment: scroll;
            background-position: left top;
        }
        .qstatus
        {
            height: auto;
            min-height: 25px;
            line-height: 25px;
            color: #009900;
            font-size: 15pt;
            font-weight: bold;
            font-family: 宋体;
            padding-left: 8px;
            text-align: center;
            vertical-align: bottom;
            background-color: #f7f7f7;
        }
        .qbody
        {
            min-height: 200px;
            height: auto;
            border-top: #9db4c6 1px solid;
            border-left: none;
            border-right: #9db4c6 1px solid;
            border-bottom: none;
        }
        .qposter
        {
            margin-left: auto;
            margin-right: auto;
            min-height: 200px;
            width: 148px;
            float: left;
            background-color: #e3eef8;
        }
        .qposter td
        {
            width: 148px;
        }
        .qbody-inner
        {
            min-height: 200px;
            height: auto;
            width: 560px;
            float: right;
            text-align: left;
            vertical-align: top;
            background-color: white;
            text-indent: 0.5em;
            padding-top: 8px;
            padding-left: 8px;
            padding-right: 8px;
            padding-bottom: 8px;
            line-height: 20px;
        }
        .qbody-inner p
        {
            letter-spacing: 1px;
            line-height: 21px;
            margin: 5px 5px 5px 5px;
            padding: 0px;
        }
        .abody
        {
            height: auto;
            text-align: left;
            border-top: #9db4c6 1px solid;
            border-right: #9db4c6 1px solid;
            border-left: none;
        }
        .separator
        {
            clear: both;
            height: 1px;
            background-color: #176b9d;
        }
        #answerForm
        {
            text-align: center;
        }
        #expertEvaluate
        {
            display: none;
        }
        #expertEvaluate input
        {
            border: #595959 1px solid;
        }
        input
        {
            border: #595959 1px solid;
        }
    </style>
    <link type="text/css" href="../resources/themes/base/ui.all.css" rel="stylesheet" />

    <script type="text/javascript" src="../js/jquery-1.3.2.js"></script>

    <script type="text/javascript" src="../js/ui/ui.core.js"></script>

    <script type="text/javascript" src="../js/ui/ui.draggable.js"></script>

    <script type="text/javascript" src="../js/ui/ui.resizable.js"></script>

    <script type="text/javascript" src="../js/ui/ui.dialog.js"></script>

    <script type="text/javascript" src="../js/scroll2anchor.js"></script>

    <script type="text/javascript">
        function submitForm() {
            if ($('#txAnswer').val() != '') {
                $('#frmAnswer').submit();
            }
            else {
                alert('请填写您的答案！');
                $('#txAnswer').focus();
            }
        }

        function cancelEvaluate() {
            $('#expertEvaluate').dialog('close');
        }

        function doEvaluate() {
            $('#expertEvaluate').dialog({
                autoShow: false,
                hide: 'slide',
                show: 'slide',
                title: '给专家评分',
                beforeclose: function() {
                }
            });
            $('#expertEvaluate').dialog('open');
        }
    </script>

</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <form runat="server" id="frmEvaluate">
    <div class="qcontext">
        <a name="qbody"></a>
        <div class="qbody">
            <table cellpadding="0" cellspacing="0">
                <tr>
                    <td style="height: 24px; background-color: #8CC1F5; color: White; font-size: 14px;
                        font-weight: bold; text-align: center; line-height: 24px; vertical-align: middle;
                        width: 148px;">
                        <asp:Label runat="server" ID="lblStatus" Font-Size="14px" Font-Names="宋体" ForeColor="White"></asp:Label>
                    </td>
                    <td style="height: 24px; background-color: #e3eef8; border-bottom: #E9F3FD 1px solid;
                        vertical-align: middle; padding-left: 8px; padding-right: 4px; width: 592px;">
                        <asp:Label runat="server" ID="lblTitle" Font-Size="14px" Font-Names="宋体" ForeColor="Black"
                            Style="float: left;"></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td style="vertical-align: top; background-color: #e3eef8">
                        <div class="qposter" style="text-align: center;">
                            <uc1:ucUserCard ID="ucPosterCard" runat="server" />
                        </div>
                        <div style="width: 148px; margin-left: 10px; margin-bottom: 10px;">
                            <asp:Label runat="server" ID="lblDate" Font-Size="12px" Font-Names="宋体" ForeColor="#595959"></asp:Label></div>
                    </td>
                    <td style="vertical-align: top;">
                        <div class="qbody-inner">
                            <%= GetQuestionContext() %>
                        </div>
                    </td>
                </tr>
                <tr>
                    <td colspan="2" style="vertical-align: top;">
                        <div style="height: 25px; border-top: #9db4c6 1px solid; clear: both; text-align: right;
                            padding-right: 5px; font-size: 9pt; line-height: 25px; vertical-align: middle;">
                            <%= GetOperationBar(false) %>
                        </div>
                    </td>
                </tr>
            </table>
        </div>
        <div class="abody">
            <asp:DataList runat="server" ID="dlAnswer" RepeatLayout="Table" OnItemDataBound="dlAnswer_ItemDataBound"
                Width="100%">
                <ItemTemplate>
                    <a id="A1" runat="server" name='<%# Eval("OID") %>'></a>
                    <div style="height: 25px; background-color: white; border-bottom: #9db4c6 1px solid;">
                        <div style="height: 25px; background-color: #8CC1F5; color: White; font-size: 14px;
                            font-weight: bold; text-align: center; line-height: 24px; vertical-align: middle;
                            width: 151px;">
                            <asp:Label runat="server" ID="lblStatus" Font-Size="14px" Font-Names="宋体" ForeColor="White"
                                Text="回复区域"></asp:Label>
                        </div>
                    </div>
                    <div class="qposter">
                        <uc1:ucUserCard ID="ucAnswerPoster" runat="server" />
                    </div>
                    <div class="qbody-inner">
                        <%# Eval("Context") %>
                    </div>
                    <div style="height: 25px; background-color: White; border-top: #9db4c6 1px solid;
                        border-bottom: #9db4c6 1px solid; clear: both; text-align: right; padding-right: 5px;
                        font-size: 9pt; line-height: 25px; vertical-align: middle;">
                        <%= GetOperationBar(true) %>
                    </div>
                </ItemTemplate>
                <ItemStyle BackColor="white" />
            </asp:DataList>
        </div>
        <a name="answerForm"></a>
        <% if (CanReply)
           { %>
        <div id="answerForm">
            <table>
                <tr>
                    <td style="height: 30px;">
                    </td>
                </tr>
                <tr>
                    <td style="vertical-align: top; font-family: 宋体; font-size: 9pt; text-align: left;
                        padding-left: 8px;">
                        对该问题的回复
                    </td>
                </tr>
                <tr>
                    <td style="vertical-align: top; width: 420px;">
                        <input type="hidden" name="txQuestion" value='<% Response.Write(Request["oid"]); %>' />
                        <textarea cols="100" rows="8" style="width: 420px; border: #cccccc 1px solid;" id="txAnswer"
                            name="txAnswer"></textarea>
                    </td>
                </tr>
                <tr>
                    <td style="vertical-align: top; text-align: center;">
                        <input type="button" value="回复" onclick="submitForm();" style="width: 75px" />
                        <input type="reset" value="取消" onclick="if (!confirm('确定取消该回复吗？')) return false;"
                            style="width: 75px" />
                    </td>
                </tr>
            </table>
        </div>
        <%} %>
    </div>
    <asp:Panel runat="server" ID="pnLinks" class="qlinks">
        <uc4:ucLastedQuestionList ID="ucLastedQuestionList1" runat="server" />
    </asp:Panel>
    <div id="expertEvaluate">
        <asp:Label runat="server" ID="lblText" Visible="false">
        没有专家参与回复您的问题。
        </asp:Label>
        <asp:DataList ID="dlExpertEvaluate" runat="server" Width="200px">
            <ItemTemplate>
                <asp:Label runat="server" ID="lblExpertName" Text='<%# Eval("Name") %>'></asp:Label>
                <asp:DropDownList runat="server" ID="ddlEavluate" expertoid='<%# Eval("OID") %>'
                    EnableViewState="true">
                    <asp:ListItem Text="0" Value="0"></asp:ListItem>
                    <asp:ListItem Text="0.5" Value="0.5"></asp:ListItem>
                    <asp:ListItem Text="1" Value="1"></asp:ListItem>
                    <asp:ListItem Text="1.5" Value="1.5"></asp:ListItem>
                    <asp:ListItem Text="2" Value="2"></asp:ListItem>
                    <asp:ListItem Text="2.5" Value="2.5"></asp:ListItem>
                    <asp:ListItem Text="3" Value="3"></asp:ListItem>
                    <asp:ListItem Text="3.5" Value="3.5"></asp:ListItem>
                    <asp:ListItem Text="4" Value="4" Selected="True"></asp:ListItem>
                    <asp:ListItem Text="4.5" Value="4.5"></asp:ListItem>
                    <asp:ListItem Text="5" Value="5"></asp:ListItem>
                </asp:DropDownList>
            </ItemTemplate>
            <ItemStyle VerticalAlign="Middle" HorizontalAlign="Center" Height="30px" />
            <FooterTemplate>
                <asp:Button ID="btnEvaluate" runat="server" Text="提交" Style="width: 70px;" OnClick="btnEvaluate_Click" />
                <input type="button" value="取消" onclick="cancelEvaluate();" style="width: 70px;" />
            </FooterTemplate>
            <FooterStyle HorizontalAlign="Center" Height="40px" />
        </asp:DataList>
    </div>
    </form>
</asp:Content>
